import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';

enum Api {
  list = '/mall-admin-service/umsMember/pageUser',
  recycleBinList = '/mall-admin-service/umsMember/recycleBin',
  recoverRecycleBin = '/mall-admin-service/umsMember/recoverRecycleBin',
  deleteRecycleBin = '/mall-admin-service/umsMember/deleteRecycleBin',
  batchUpdateStatus = '/mall-admin-service/umsMember/batchUpdateStatus',
}

/**
 * 列表接口
 * @param params
 */
export const list = (params) => 
  defHttp.get({url: Api.list, params});

/**
 * 回收站列表
 * @param params
 */
export const getRecycleBinList = (params) =>
  defHttp.get({url: Api.recycleBinList, params});
/**
 * 回收站还原
 * @param params
 */
export const recoverRecycleBin = (params,handleSuccess) =>{
  return defHttp.put({url: Api.recoverRecycleBin, params}).then(() => {
    handleSuccess();
  });
}
/**
 * 回收站删除
 * @param params
 */
export const deleteRecycleBin = (params,handleSuccess) => {
  return defHttp.delete({url: Api.deleteRecycleBin, params}, {joinParamsToUrl: true}).then(() => {
    handleSuccess();
  });
}

/**
 * 冻结解冻
 * @param params
 */
export const batchUpdateStatus = (params,handleSuccess) => {
  return defHttp.post({url: Api.batchUpdateStatus, params}).then(() => {
    handleSuccess();
  });
}


  